/*
 * bsp_i2c.h
 *
 *  Created on: 2023年6月28日
 *      Author: mcealt_DS
 */

#ifndef BSP_I2C_H_
#define BSP_I2C_H_

#include <stdint.h>

#include "SM_keypad.h"

#define I2C_TXBUFFER_SIZE                                           20
#define I2C_RXBUFFER_SIZE                                           20

void I2C_setTimeOut(uint32_t tm);  //可以根据不同设备,对I2C超时进行调整,上电默认I2C超时为100ms
uint32_t I2C_getTimeOut(void);
void I2C_software_reset(void);
void I2C_LeaderWrite(uint16_t followerAddress, uint8_t targetAddress, uint8_t *txBuff, uint8_t numBytes);
void I2C_LeaderRead(uint16_t followerAddress, uint8_t targetAddress, uint8_t *rxBuff, uint8_t numBytes);


#endif /* BSP_I2C_H_ */
